<!-- userList.html 2017-08-08 16:55:52-->
#@HplusLayout()
#define content()
<div style="padding:0 10px;height: 100%">
	<div id="AdvanceSearch" style="padding:15px;display: none">
		<form class="form-horizontal" novalidate="novalidate" onsubmit="return bootstrapTableRefresh()">
						<div class="form-group">
				<label class="col-xs-2 control-label">平台：</label>
				<div class="col-xs-4">
<select name="portal" class="form-control">
	<option value="">请选择</option>
	#(data("AUTH_PORTAL","option",""))
</select>
				</div>
				<label class="col-xs-2 control-label">UID：</label>
				<div class="col-xs-4">
	<input type="text" class="form-control" name="uid"/>
				</div>
			</div>
	    			<div class="form-group">
				<label class="col-xs-2 control-label">用户名：</label>
				<div class="col-xs-4">
	<input type="text" class="form-control" name="username"/>
				</div>
				<label class="col-xs-2 control-label">姓名：</label>
				<div class="col-xs-4">
	<input type="text" class="form-control" name="name"/>
				</div>
			</div>
	    			<div class="form-group">
				<label class="col-xs-2 control-label">手机号：</label>
				<div class="col-xs-4">
	<input type="text" class="form-control" name="phone"/>
				</div>
				<label class="col-xs-2 control-label">验证手机号：</label>
				<div class="col-xs-4">
	<label style="font-weight:normal;line-height: 35px"><input type="radio" name="phone_auth" checked="checked" value=""/> 全部 </label>
	#for(item:data("SHIFOU"))
	<label style="font-weight:normal;line-height: 35px"><input type="radio" name="phone_auth" value="#(item.key)"/> #(item.value.name) </label>
	#end
				</div>
			</div>
	    			<div class="form-group">
				<label class="col-xs-2 control-label">邮箱：</label>
				<div class="col-xs-4">
	<input type="text" class="form-control" name="email"/>
				</div>
				<label class="col-xs-2 control-label">状态：</label>
				<div class="col-xs-4">
	<label style="font-weight:normal;line-height: 35px"><input type="radio" name="enable_flag" checked="checked" value=""/> 全部 </label>
	#for(item:data("ENABLE_FLAG"))
	<label style="font-weight:normal;line-height: 35px"><input type="radio" name="enable_flag" value="#(item.key)"/> #(item.value.name) </label>
	#end
				</div>
			</div>
	    			<div class="form-group">
				<div class="col-xs-8 col-xs-offset-3">
					<button type="reset" class="btn btn-default">清空</button> 
					<button type="submit" class="btn btn-primary">开始查询</button> 
				</div>
			</div>
		</form>
	</div>
	<div id="toolbar">
		<button onclick="layer.open({area: ['550px', '490px'],content: 'addEditUser',type: 2,title: '新增用户'});" type="button" class="btn btn-outline btn-default"><i class="glyphicon glyphicon-plus"></i></button>
		<button onclick="layer.open({area: ['650px', 'auto'],content:$('#AdvanceSearch'),type:1,shade: false,title:'搜索'});" type="button" class="btn btn-outline btn-default"><i class="glyphicon glyphicon-search"></i></button>
		<button onclick="layer.open({area: ['550px', '490px'],content: 'importUser',type: 2,title: '批量导入'});" type="button" class="btn btn-outline btn-default"><i class="glyphicon glyphicon-plus"></i>批量导入</button>
		<button onclick="ajaxTodo('reloadUserCache')" type="button" class="btn btn-outline btn-default"><i class="glyphicon glyphicon-refresh"></i>更新缓存</button>
	</div>
	<table id="bootstrapTable" data-id-field="id" data-url="userList" data-sort-name="id" data-sort-order="desc">
		<thead>
			<tr>
				<th data-checkbox="true"></th>
				<th data-formatter="xuhaoFormatter" data-align="center" data-width="70px">序号</th>
				<th data-field="portal_cn" data-align="center">平台</th>
				<th data-field="uid" data-align="center">UID</th>
				<th data-field="username" data-align="center">用户名</th>
				<th data-field="name" data-align="center">姓名</th>
				<th data-field="phone" data-align="center">手机号</th>
				<th data-field="email" data-align="center">邮箱</th>
				<th data-field="dept_id_cn" data-align="center">部门</th>
				<th data-field="enable_flag_cn" data-align="center">状态</th>
				<th data-field="create_time" data-align="center" data-width="150px">创建时间</th>
				<th data-formatter="caozuoFormatter">操作</th>
			</tr>
		</thead>
	</table>
</div>
#end
#define css()
<link href="#(res_path)/hplus/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
#end
#define js()
<script src="#(res_path)/hplus/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
<script src="#(res_path)/hplus/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
<script src="#(res_path)/hplus/js/plugins/laydate/laydate.js"></script>
#end
#define jsFunction()
<script>
	function caozuoFormatter(value,row,index){
		var str = "";
		str = str + "<a href=\"javascript:\" onclick=\"layer.open({area: ['550px', '490px'],content: 'addEditUser?id="+row.id+"',type: 2,title: '编辑用户'});\">编辑</a>  ";
		str = str + "<a href=\"javascript:\" onclick=\"layer.open({area: ['550px', '500px'],content: 'editUserRole?id="+row.id+"',type: 2,title: '用户角色'});\">用户角色</a>  ";
		
		return str;
	}
</script>
#end